﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Business.Compta
{

    public class User
    {
        private int id;
        private String login, _login;
        private String password, _password;
        private String userName, _userName;
        private String mail, _mail;


        public int Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }
        public String Login
        {
            get
            {
                return login;
            }
            set
            {
                this.login = value;
            }
        }
        public String Mail
        {
            get
            {
                return mail;
            }
            set
            {
                this.mail = value;
            }
        }
        public String UserName
        {
            get
            {
                return userName;
            }
            set
            {
                this.userName = value;
            }
        }
        public String Password
        {
            get
            {
                return password;
            }
            set
            {
                this.password = value;
            }
        }

        public User()
        {
            this.id = -1;
        }

        public User(int _id, String _login, String _userName, String _password, String _mail)
        {
            this.id = _id;
            this.login = _login;
            this.password = _password;
            this.userName = _userName;
            this.mail = _mail;
            this._login = _login;
            this._password = _password;
            this._userName = _userName;
            this._mail = _mail;
        }



        public void commit()
        {
            this._login = this.login;
            this._password = this.password;
            this._userName = this.userName;
            this._mail = mail;
        }

        public void reject()
        {
            this.login = this._login;
            this.password = this._password;
            this.userName = this._userName;
            this.mail = _mail;
        }
    }

}
